home *** CD-ROM | disk | FTP | other *** search
/ Over 1,000 Windows 95 Programs / Over 1000 Windows 95 Programs (Microforum) (Disc 1).iso / 1471 / clsmessa.cls < prev    next >
Encoding:
Text File  |  1997-02-11  |  1.2 KB  |  63 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "clsMessage"
  6. Attribute VB_Creatable = False
  7. Attribute VB_Exposed = False
  8. Option Explicit
  9.  
  10.  
  11. Private pChildren As clscMessages
  12. Public Subject As String
  13. Public Sender As String
  14. Public DateSent As Date
  15. Public Message As String
  16. Public Image As Variant 'required. Index or key of an icon in an imagelist
  17. Public HasChildren As Boolean 'required. ThreadView needs this to know whether draw plus/minus
  18. Public Parent As clscMessages
  19. Public ID As Long
  20.  
  21. 'Requred  function
  22. Public Function Properties(value)
  23.  
  24. Select Case value
  25.     Case "Subject"
  26.         Properties = Subject
  27.     Case "Sender"
  28.         Properties = Sender
  29.     Case "DateSent"
  30.         Properties = DateSent
  31.     Case "Message"
  32.         Properties = Message
  33.     Case "Parent"
  34.         Set Properties = Parent
  35.     Case "ID"
  36.         Properties = ID
  37.     Case Else
  38.         'Trap your own typing mistakes
  39.         Properties = "#Error#"
  40. End Select
  41.  
  42. End Function
  43.  
  44. Private Sub Class_Initialize()
  45. Image = "Text"
  46.  
  47. End Sub
  48.  
  49. Public Property Get Children()
  50.  
  51. If pChildren Is Nothing Then
  52.     Set pChildren = New clscMessages
  53.     pChildren.Create Me
  54. End If
  55.  
  56. Set Children = pChildren
  57.  
  58. End Property
  59.  
  60.  
  61.  
  62.  
  63.